dnl Process this file with autoconf to produce a configure script.
dnl Created by Anjuta application wizard.

AC_INIT(nc2ifeel_nokia_client, 0.2)

AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE

AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC




dnl ***************************************************************************
dnl Internatinalization
dnl ***************************************************************************
IT_PROG_INTLTOOL([0.35.0])
GETTEXT_PACKAGE=nc2ifeel_nokia_client
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"],
		   [messages])
AM_GLIB_GNU_GETTEXT


AM_PROG_LIBTOOL

# Option to enable debugging
AC_ARG_ENABLE(debug, 
	      [AC_HELP_STRING([  --enable-debug],[Debugging (default=no)])], 
	      [with_debug=yes], [with_debug=no])

if test "x$with_debug" == "xyes" ; then
	CFLAGS="$CFLAGS -ggdb -O0 -DDEBUG -Wall -ansi -pedantic"
else
	CFLAGS="$CFLAGS -O2 -Wall -ansi -pedantic"
fi

PKG_CHECK_MODULES(HILDON, hildon-1 hildon-fm-2 )
AC_SUBST(HILDON_LIBS)
AC_SUBST(HILDON_CFLAGS)

PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.60)

PKG_CHECK_MODULES(NC2IFEEL_NOKIA_CLIENT, [gtk+-2.0 >= 2.8 libglade-2.0 >= 2.4.0   liblocation ])
AC_SUBST(NC2IFEEL_NOKIA_CLIENT_CFLAGS)
AC_SUBST(NC2IFEEL_NOKIA_CLIENT_LIBS)

PKG_CHECK_MODULES(OSSO, osso-af-settings >= 0.8.5 libosso >= 0.9.17 gnome-vfs-2.0 >= 2.8.4.11 gnome-vfs-module-2.0 >= 2.8.4.11)
AC_SUBST(OSSO_LIBS)
AC_SUBST(OSSO_CFLAGS)

desktopentrydir=`$PKG_CONFIG osso-af-settings --variable=desktopentrydir`
serviceentrydir=`$PKG_CONFIG osso-af-settings --variable=dbusservicedir`
localedir=`$PKG_CONFIG osso-af-settings --variable=localedir`
pixmapdir=`$PKG_CONFIG osso-af-settings --variable=dbusservicedir`
icon_26x26dir=$datadir/icons/hicolor/26x26/hildon
icon_34x34dir=$datadir/icons/hicolor/34x34/hildon
icon_40x40dir=$datadir/icons/hicolor/40x40/hildon
icon_50x50dir=$datadir/icons/hicolor/50x50/hildon
icon_scalabledir=$datadir/icons/hicolor/scalable/hildon

# Help file install directory
helpfile_engbdir=$datadir/hildon-help/en_GB

# Hildon control panel plugin install directories
pluginlibdir=`$PKG_CONFIG hildon-control-panel --variable=plugindir`
plugindesktopentrydir=`$PKG_CONFIG hildon-control-panel --variable=plugindesktopentrydir`

# Define as variables in Makefiles
AC_SUBST(desktopentrydir)
AC_SUBST(serviceentrydir)
AC_SUBST(localedir)
AC_SUBST(pixmapdir)
AC_SUBST(icon_26x26dir)
AC_SUBST(icon_34x34dir)
AC_SUBST(icon_40x40dir)
AC_SUBST(icon_50x50dir)
AC_SUBST(icon_scalabledir)
AC_SUBST(pluginlibdir)
AC_SUBST(plugindesktopentrydir)
AC_SUBST(helpfile_engbdir)

AC_DEFINE_UNQUOTED([LOCALEDIR], "${localedir}", [Runtime locale catalog files path])
AC_DEFINE_UNQUOTED([PIXMAPDIR], "${pixmapdir}", [Runtime pixmap files path])

# Produce output files
AC_OUTPUT(
	  Makefile \
	  src/Makefile \
	  data/Makefile \
	  po/Makefile.in \
	  po/Makefile 
)

